Valid for Sitecore
5.3.1
6.
Html and Rich Text
Prev Next |
Fields of the html and Rich Text type contain HTML code. They can be displayed in a number of ways.
Let’s assume that current item has a My Html field of the Html field type. Here are a couple of ways to display it:
Using XslHelper class:
<xsl:value-of select="sc:fld('My Html', .)" disable-output-escaping="yes"/>
(if you wish to display the HTML markup itself, you can omit the disable-output-escaping attribute)
Using the Html XSL Control:
<sc:html field="My Html"/>
Note: The code for Html and RichText field types is the same.
Prev Next